<header class="post-header">
  <h1 class="post-title">
    <a class="post-title-link" href="<%= link %>">
      <%= title %>
    </a>
  </h1>
  <div class="post-meta">
    <% if (isTop) { %>
      <span class="meta-item">
        <i class="fa fa-thumb-tack"></i>
        <span>置顶</span>
        <span class="post-meta-divider">|</span>
      </span>
    <% } %>
    <span class="meta-item pc-show">
      <i class="fa fa-calendar-o"></i>
      <span>发布于</span>
      <span><%= dateFormat %></span>
      <span class="post-meta-divider pc-show">|</span>
    </span>
    <%if (tags && tags.length > 0) { %>
      <span class="meta-item">
        <i class="fa fa-folder-o"></i>
        <span class="pc-show">分类于</span>
        <% for(let i = 0; i < tags.length; i ++) { %>
          <%if (i === tags.length - 1) { %>
            <a href="<%= tags[i].link %>">
              <span><%= tags[i].name %></span>
            </a>
          <% } else { %>
            <a href="<%= tags[i].link %>">
              <span><%= tags[i].name %></span>
            </a>、
          <% } %>
        <% } %>
      </span>
      <span class="post-meta-divider">|</span>
    <% } %>
    <span class="meta-item">
      <i class="fa fa-clock-o"></i>
      <span><%= stats.minutes %>分钟</span>
    </span>
    <span class="meta-item">
      <span class="post-meta-divider">|</span>
      <i class="fa fa-file-word-o"></i>
      <span><%= stats.words %><span class="pc-show">字数</span></span>
    </span>
    <% if (browse) { %>
      <% let postId = link.split('/post/')[1];%>
      <% if (postId.lastIndexOf('/') === postId.length-1) { %>
        <% postId = '/post/' + postId %>
      <% } else { %>
        <% postId = '/post/' + postId + '/' %>
      <% } %>
      <span id="<%= postId %>" data-flag-title="<%= title %>" class="meta-item pc-show leancloud_visitors">
        <span class="post-meta-divider">|</span>
        <i class="fa fa-eye"></i>
        <span>浏览量：<span class="leancloud-visitors-count" ></span></span>
      </span>
    <% } %>
  </div>
</header>